package com.nuanshui.heatedloan.credit.pay.validation;

import java.io.Serializable;

public enum ValidationResultCode implements Serializable {

    VALIDATION_SUCCESS("0000","正常"),
    VALIDATION_ERROR_UNKNOWN("0001","未知异常"),
    NO_PAY_STATUS("0002","非支付状态"),
    NO_REPAY_STATUS("0003","非还款状态"),
    NO_PAY_ORDER("0004","订单不存在"),
    VALIDATION_ERROR_REAPPLY("0005","订单重复提交"),
    NO_PAY_MONEY("0006","没有支付金额"),
    VALIDATION_ERROR_ALLINPAY_HANDLED("0007","交易号已被处理过"),
    BANK_VALIDATION_FAIL("0008","该银行被禁用"),
    VALIDATION_ERROR_SIGN("0009","签名出错"),
    VALIDATION_ERROR_ALLINPAY_NETWORK("0010","通联请求发送失败"),
    VALIDATION_ERROR_ALLINPAY_TRADE("0011","通联交易失败"),
    VALIDATION_ALLINPAY_PROCESSING("0012","通联交易进行中"),
    VALIDATION_ERROR_ALLINPAY_NOTRADEID("0013","交易号不存在");

    private String code;
    private String msg; //文本内容描述

    private ValidationResultCode(String code,String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String getCode() {
        return this.code;
    }

    public String getMsg() {
        return msg;
    }

    public static boolean isSuccess(String code)
    {
        return VALIDATION_SUCCESS.getCode().equals(code);
    }
}